package routes

import (
	"dfx_cmdb/cmdb-agent/global"
	"fmt"

	"github.com/gin-gonic/gin"
)

func Routes() {
	r := gin.Default()
	v1Interface(r)

	agentAddr := fmt.Sprintf("%s:%d", global.Svc.Config.Listen.Addr, global.Svc.Config.Listen.Port)
	r.Run(agentAddr)
}

func v1Interface(r *gin.Engine) {
	g := r.Group("/api/v1")
	blackListRoutes(g)
}
